<?php

   $httpOrigin = isset($_SERVER['HTTP_ORIGIN']) ? $_SERVER['HTTP_ORIGIN'] : '';
        //java活动允许ajax跨域
        header("Access-Control-Allow-Credentials: true");
        header('Access-Control-Allow-Origin: ' . $httpOrigin);

        echo 1;